package com.zx.cloud.order.api.feign;


import com.zx.cloud.common.result.R;
import com.zx.cloud.order.api.feign.fallback.RemoteStockServiceFallbackFactory;


import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

import feign.HeaderMap;

/**
 * @author zhaoxuan
 */
@FeignClient(contextId = "remoteStockService",value = "cloud-stock",fallbackFactory = RemoteStockServiceFallbackFactory.class)
public interface RemoteStockService {

    @GetMapping("/stock/deduct")
     R<?> deduct(@RequestParam("commodityCode") String commodityCode, @RequestParam("count") Integer count);
}
